﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using Microsoft.SharePoint.Client;

namespace com.sharepointutils.application
{
    public class ListInformation
    {
        [CategoryAttribute("List Info"), ReadOnlyAttribute(true), DisplayName("List Name")]
        public String Name { get; set; }
        [CategoryAttribute("List Info"), ReadOnlyAttribute(true), DisplayName("Document Library"), Description("Is this list a document library")]
        public Boolean DocumentLibrary { get; set; }
        [CategoryAttribute("List Info"), ReadOnlyAttribute(true), DisplayName("List GUID")]
        public Guid ID { get; set; }

        [Browsable(false)]
        public ViewCollection Views { get; set; }
        [Browsable(false)]
        public FieldCollection Fields { get; set; }
        [Browsable(false)]
        public ContentTypeCollection ContentTypes { get; set; }

        public ListInformation(String name, Guid id, Boolean documentLibrary, ViewCollection views, FieldCollection fields, ContentTypeCollection contentTypes)
        {
            Name = name;
            DocumentLibrary = documentLibrary;
            Views = views;
            ID = id;
            Fields = fields;
            ContentTypes = contentTypes;
        }
    }
}
